-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add free trial pricing table to emails when appropriate #452
Conversation
We are now offering free trials to users who come referred by other users, so we need to be able to display an alternate pricing table to those users. This PR adds a check to the "email validated" screen that determines whether to offer users a free trial. It queries the referral service and renders the "free trial" pricing table if the user was referred. This PR also removes some log lines that I accidentally introduced in a recent PR.
View stack outputs
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestions, but not blocking. I'll leave it to your judgement.
if (isReferred) { | ||
stripePricingTableId = context.stripeFreeTrialPricingTableId | ||
} else { | ||
stripePricingTableId = context.stripePricingTableId | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: …I'm not totally sure what generates these errors for us, but whatever it is, I agree with it. 😄 Let's prefer the ternary to mutating a variable.
trial - pick a plan below and complete the checkout flow to get started! | ||
</p> | ||
<p> | ||
Please note that after your free trial ends, you will be charged 10 USD per month for Lite or 100 USD per month for Business tier. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: Is it safe to write these values here literally? They won't update if the pricing changes.
also add a couple useful env vars
tests failing in PR
also bump maxRetries back down because I never saw it take more than 3
We are now offering free trials to users who come referred by other users, so we need to be able to display an alternate pricing table to those users.
This PR adds a check to the "email validated" screen that determines whether to offer users a free trial. It queries the referral service and renders the "free trial" pricing table if the user was referred.
This PR also removes some log lines that I accidentally introduced in a recent PR.